#ifndef SQLMODEL_H
#define SQLMODEL_H

#include <QObject>
#include <QSqlDatabase>
#include <QSqlRecord>
#include <QSqlQuery>
#include <QSqlTableModel>
#include <QSqlError>

class SqlModel : public QObject
{
    Q_OBJECT
public:
    explicit SqlModel(QObject *parent = nullptr);
    static int insert_userinfo(QString username,QString password);
    static bool insert_TAB_DEPART(QString DEPART_ID,QString DEPART_NAME,QString DEPART_UPPER_DEPT);
    static bool insert_classxml(QString _class,QString xmlpath);
    static bool insert_facedata(QString _class,QString label,QString userid,QString facepath);
    static bool insert_checked(int id,QString name,QString job_number,QString time,QString late);
    static bool insert_department(QString last_homenumber,QString name,QString number,QString story,QString tel,QString _extern);

    static bool insert_depart(QString home,QString homeid,QString department,QString departid,QString dclass,QString dclassid);
    static bool insert_Train_Plan_Management(QString year,QString name,QString type,QString major,QString time,QString people_number,QString status);
    static bool insert_Train_Plan_Detailed_Management(QString year,QString name,QString type,QString major,QString time,
                                                      QString person_number,QString status,QString Training_Purpose,QString Training_Content,
                                                      QString class_hour,QString teacher);
    static QString insert_Employee_Information(QString name,QString sex,QString job_number,QString id_number,QString birthday,QString native_place,QString post,QString title,QString home,QString department,QString stuff_class,QString tel,QString working_hours,QString facepath,int label,int count);
    static bool insert_User_Plan(QString name,QString job_number,QString type,QString major,int year,QString status,QString study_time,int Attendance,int checkscore,int testscore,int score);
    static int select_userid_for_label(int label);
signals:

public slots:
};

#endif // SQLMODEL_H
